package study.sharding.spring.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import study.sharding.spring.mapper.orderbase.OrderBaseEO;
import study.sharding.spring.mapper.orderbase.OrderBaseMapper;

@Slf4j
@Service("orderService")
public class OrderService {

    @Autowired
    private OrderBaseMapper orderBaseMapper;

    public int add(String orderNo) {
        OrderBaseEO rbEO = new OrderBaseEO();
        rbEO.setRbOrderNo(orderNo);
        int count = orderBaseMapper.insert(rbEO);

//        OrderItemEO riEO = new OrderItemEO();
//        riEO.setRiOrderNo(orderNo);
//        orderItemMapper.insert(riEO);
        return count;
    }
}
